home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Sprite 1984 - 1993
/
Sprite 1984 - 1993.iso
/
man
/
lib.fmt
/
tcl
/
Concat.man
< prev
next >
Wrap
Text File
|
1992-02-14
|
2KB
|
67 lines
Tcl_Concat C Library Procedures Tcl_Concat
_________________________________________________________________
NNAAMMEE
Tcl_Concat - concatenate a collection of strings
SSYYNNOOPPSSIISS
##iinncclluuddee <<ttccll..hh>>
char *
TTccll__CCoonnccaatt(_a_r_g_c, _a_r_g_v)
AARRGGUUMMEENNTTSS
int_a_r_g_c(in)
Number of strings.
char*_a_r_g_v[](in)
Array of strings to concatenate. Must have _a_r_g_c entries.
_________________________________________________________________
DDEESSCCRRIIPPTTIIOONN
TTccll__CCoonnccaatt is a utility procedure used by several of the Tcl
commands. Given a collection of strings, it concatenates
them together into a single string, with the original
strings separated by spaces. This procedure behaves dif-
ferently than TTccll__MMeerrggee, in that the arguments are simply
concatenated: no effort is made to ensure proper list struc-
ture. However, in most common usage the arguments will all |
be proper lists themselves; if this is true, then the |
result will also have proper list structure. |
TTccll__CCoonnccaatt eliminates leading and trailing white space as it |
copies strings from aarrggvv to the result. If an element of |
aarrggvv consists of nothing but white space, then that string |
is ignored entirely. This white-space removal was added to |
make the output of the ccoonnccaatt command cleaner-looking.
The result string is dynamically allocated using mmaalllloocc(());
the caller must eventually release the space by calling
ffrreeee(()).
KKEEYYWWOORRDDSS
concatenate, strings
Sprite v1.0 1